package cn.jasonone.bbs.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.jasonone.bbs.bean.Comment;
import cn.jasonone.bbs.mapper.CommentMapper;
import cn.jasonone.bbs.service.CommentService;

@Service("commentService")
public class CommentServiceImpl implements CommentService {
	@Resource
	private CommentMapper commentMapper;

	@Override
	public List<Comment> findAll(Comment t) {
		return commentMapper.findAll(t);
	}

	@Override
	public Comment findByID(Long id) {
		return commentMapper.findByID(id);
	}

	@Override
	public boolean insert(Comment t) {
		// TODO Auto-generated method stub
		return commentMapper.insert(t) > 0;
	}

	@Override
	public boolean update(Comment t) {
		return commentMapper.update(t) > 0;
	}

	@Override
	public boolean delete(Comment t) {
		return commentMapper.delete(t) > 0;
	}

}
